<?php

#require($GLOBALS['srvpath'].'data/instbl.php');

require('/srv/http/scrap/conf.php');

function display_panel($args) {

#$handler=$GLOBALS['srvpath'].'data/instbl.php';

#if ($_POST['field']&&$_POST['table']&&$_POST['value']&&$_POST['operation']) {
#	$dlv['field']=$_POST['field'];
#	$dlv['table']=$_POST['table'];
#	$dlv['value']=$_POST['value'];
#	$dlv['operation']=$_POST['operation'];
#	InsTbl($dlv);
#}
#else {

#echo 'disp';

$act='action="'.$docroot.'cpanel/"';

if (!$args) {
	$table=' ';
	$info_field=' ';
	$info_value='';
}
else {
	$table=$args['table'];
	$info_field=$args['info_field'];
	$info_value=$args['info_value'];
	$ttbl='value='.$table;
	$ttif='value='.$info_field;
#echo $table;
}


echo <<<HTML

<html>

<head>
<title>Cloister Control Panel</title>
</head>

<body>

<form name='insert' method='post' $act>
<input type="radio" name="operation" value="update" /> Update<br />
<input type="radio" name="operation" value="insert" /> Insert<br />
<input type="radio" name="operation" value="load" /> View<br />
Table: <input type="text" name="table" $ttbl /><br />
info_field: <input type="text" name="field" $ttif /><br />
info_value: <br />
<textarea rows="30" name="value" cols="50">$info_value</textarea><br />
<input type="submit" name="button" id="button" value="Submit" />
</form>


</body>

</html>

HTML;

}

#}

?>
